<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
    <style>
        .all{
            width:300px; height: 300px;
            border: solid 2px red;
            margin: 50px auto;
            overflow: hidden;
        }
        .all>p{
            width:300px; height: 300px;
            background: pink;  
            transform: translateY(-300px);
            transition: all 1s linear;
        }
        .all:hover>p{
            transform: translateY(0);
        }
    </style>
</head>
<body>
    <div class="all">
        <p>美丽好美美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀美丽好美呀呀</p>
    </div>
</body>
</html>